package org.luxor.cloud.portal.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.luxor.cloud.portal.entity.GatewayRouteEntity;
import org.luxor.cloud.portal.mapper.GatewayRouteMapper;
import org.luxor.cloud.portal.service.IGatewayRouteService;
import org.luxor.commons.core.utils.BeanUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 网关API接口定义
 *
 * @author administrator @date 2020-10-29 14:22:21
 */
@Service("gatewayRouteService")
public class GatewayRouteServiceImpl extends ServiceImpl<GatewayRouteMapper, GatewayRouteEntity> implements IGatewayRouteService {

    @Override
    public IPage<GatewayRouteEntity> page(IPage<GatewayRouteEntity> page, Map query) {
        GatewayRouteEntity queryEntity = BeanUtils.toObject(GatewayRouteEntity.class, query);
        return super.page(page, Wrappers.query(queryEntity));
    }
}
